home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 4 / CU Amiga Magazine's Super CD-ROM 04 (1996)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1996-11].iso / magazine / psion / apps2 / costsell.lzx / costsell.opl < prev    next >
Text File  |  2019-01-04  |  1KB  |  52 lines

  1. APP CostSell
  2.     TYPE 0
  3.     ICON "\opd\costsell"
  4. ENDA
  5.  
  6. Proc XCOST:
  7. LOCAL g$(1),X,P,v,vat,sell,mup,cost$(30)
  8. cost$="0" :sell=0 :mup=0 :vat=17.5
  9. cls
  10. do
  11. m1=0 :m2=0 :m3=0 :m4=0
  12. dINIT
  13. dTEXT "","Cost/Sell/Mark-up",$302
  14. dEDIT cost$,"Cost Equation",10
  15. dFLOAT sell,"Selling Price",0,32768
  16. dFLOAT mup,"Mark-up %",0,100
  17. dFLOAT vat,"VAT Rate %",0,100
  18. IF DIALOG=0
  19.     STOP
  20. ENDIF
  21. m1=eval(cost$)
  22. m2=sell
  23. m3=mup
  24. v=1.0+(vat/100)
  25. M2=M2/v
  26. IF M1=0
  27. X=M3
  28. X=(X/100)+1:M1=M2/X
  29. ENDIF
  30. IF M2=0
  31. X=M3
  32. X=(X/100)+1:M2=M1*X
  33. ENDIF
  34. IF M3=0
  35. M3=((M2-M1)/M1)*100
  36. ENDIF
  37. X=((M2-M1)/M2)*100
  38. P=M2-M1
  39. M2=M2*v
  40. dINIT : REM"Cost/Sell/Mark-up"
  41. dTEXT "Equation",cost$,$200
  42. dTEXT "Cost Price","œ"+FIX$(M1,2,7)+" (+VAT=œ"+fix$((m1*v),2,7)+")"
  43. dTEXT "Sell Price","œ"+FIX$(M2,2,7)+" (-VAT=œ"+fix$((m2/v),2,7)+")"
  44. dTEXT "Profit","œ"+FIX$(P,2,7)+" (Disc="+FIX$(X,2,7)+"%)"
  45. dTEXT "Mark-up",FIX$(M3,2,7)+"%"
  46. if DIALOG=0
  47.     return
  48. endif
  49. until 0
  50. endp
  51.  
  52.